An accounting system for processing accounts in banks and some type of scientific computation may require numerical error to be small. To this end, multiple-precision numerical representation or variable-precision numerical representation may be employed. In such a case, a single integer may express a sign and an exponent. Further, a digit string separate from the sign and the exponent expressed by the single integer may often be used to represent a mantissa. When such numerical representation is employed, integer calculation may often be utilized to implement arithmetic operation between numerical values.
In contrast, study has been underway on a method for implementing multiple-precision or variable-precision floating-point arithmetic by use of fixed-precision floating-point arithmetic. A hardware processing unit is often available for fixed-precision floating-point arithmetic. The use of such a hardware processing unit can improve processing speed compared to the case in which all processes are performed by software. For example, there is a library that performs multiple-precision binary floating-point arithmetic by use of double-precision floating-point arithmetic.
In such a method, a single number is represented by a set of fixed-precision floating-point numbers, which may be referred to as an “unvalued sum” because the set is used as it is, without adding up the individual numbers. Arithmetic operation between different sets may be performed to implement a high-precision arithmetic operation (i.e., four arithmetic operations).
A method of efficiently performing four arithmetic operations is already available as described above. In order to use such a method in a computing system (software) designed to perform arithmetic operation by use of integer calculation, there is an issue to be solved in respect of the conversion of data representation as well as the implementation of four arithmetic operations.
Numerical value representation in the computing system designed for integer calculation may not be changed for the sake of preserving system compatibility. In such a case, a number represented by an integer (i.e., a digit string) needs to be converted into a set of fixed-precision floating-point numbers. Further, after arithmetic operation is performed between different sets of fixed-precision floating-point numbers, the result of the operation may need to be converted back into the original digit-string representation for storage in memory. Such an inverse-conversion may be performed by utilizing quantizing operation as will be described later. It is desirable to efficiently perform this quantizing operation in order to efficiently convert a form of expression from a set of fixed-precision floating-point numbers into a multiple-precision or variable-precision floating-point number.